﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dpdw.Behaviour.StrategyPattern
{
    public abstract class Duck
    {
        public Duck()
        {

        }

        public FlyBehavior FlyBehavior
        {
            get;
            set;
        }

        public QuackBehavior QuackBehavior
        {
            get;
            set;
        }

        public abstract void Display();

        public void PerformFly()
        {
            FlyBehavior.Fly();
        }

        public void PerformQuack()
        {
            QuackBehavior.Quack();
        }

        public void Swim()
        {
            System.Diagnostics.Trace.WriteLine("I'm swimming.");
        }
    }
}
